<?php namespace App\Exceptions;

use Exception;

class NotFoundException extends Exception
{
    const UserNotFound =0x00;
    const UserInfoNotFound = 0x01;
    const PhotoNotFound = 0x02;
    const FileNotFound = 0x03;
    const ProjectNotFound = 0x04;
    const UrlNotFound = 0x05;

    public function __construct($code,array $data = [],Exception $previous = null)
    {
        switch($code){
            case self::UserNotFound:
                $message = trans('exception.not_found.user',[]);
                break;
            case self::UserInfoNotFound:
                $message = trans('exception.not_found.userinfo',[]);
                break;
            case self::PhotoNotFound:
                $message = trans('exception.not_found.photo',[]);
                break;
            case self::FileNotFound:
                $message = trans('exception.not_found.file',[]);
                break;
            case self::ProjectNotFound:
                $message = trans('exception.not_found.project',[]);
                break;
            case self::UrlNotFound:
                $message = trans('exception.not_found.Url',[]);
                break;
            default:
                $message = trans('general.unknown_exception');
                break;
        }

        parent::__construct($message,$code,$previous);
    }
}